<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script >
function showContent(){
	var content = FCKeditorAPI.GetInstance("myeditor").GetHTML(false);
	alert(content);
	document.getElementById("content").innerHTML = content;
}
function clearContent(){
	FCKeditorAPI.GetInstance("myeditor").setHTML("");
}
</script>
<div style="padding:10px;">
<textarea id="myeditor" name="myeditor" cols="80" rows="24" wrap="virtual"/>
</textarea>
</div> 
<script type="text/javascript">
    var name = 'myeditor';
    //var base_url = window.location.href;
   // base_url = base_url.substring(0,base_url.indexOf('/tag.'));
    var editor = new FCKeditor(name,'100%','400','Default') ;
    //editor.BasePath= 'fckeditor/';
    //editor.Width = '900px';
    //editor.Height = '400px'; 
	
    editor.ReplaceTextarea() ;
</script>
<div>
	<input type="button" value="Submit" onclick="javascript:showContent();" />
	<input type="button" value="Clear" onclick="javascript:clearContent();" />
</div>
<div style="background:#f1f1f1; padding:10px;">
	<h4>The content of editor:</h4>
	<div id="content" >
	</div>
</div>